home *** CD-ROM | disk | FTP | other *** search
/ Teach Your Children: Road Construction Ahead / Teach Your Children: Road Construction Ahead.iso / pc / rca / road.dxr / 00144_hatClick3d.ls < prev    next >
Encoding:
Text File  |  1996-07-17  |  571 b   |  22 lines

  1. global gCustomCursor, g3DObject, gRollAnimButton, gHardHatObject
  2.  
  3. on mouseDown
  4.   if objectp(gCustomCursor) then
  5.     if the type of gCustomCursor = #camera then
  6.       repeat with whichRoll = 0 to 2
  7.         set rollChan to the firstRollChan of g3DObject + whichRoll
  8.         if rollOver(rollChan) then
  9.           exit repeat
  10.         end if
  11.       end repeat
  12.       takePhoto(g3DObject, whichRoll + 1)
  13.     else
  14.       resetTool(g3DObject)
  15.     end if
  16.   else
  17.     if not objectp(gRollAnimButton) then
  18.       addHat(gHardHatObject, "HH3D" & string(random(3)))
  19.     end if
  20.   end if
  21. end
  22.